package com.ijiuchuang.jc_localization.view.adapter;

import android.content.Context;
import android.view.View;

import com.ijiuchuang.jc_localization.R;
import com.ijiuchuang.jc_localization.app.Config;
import com.ijiuchuang.jc_localization.bean.cache.DeviceListCache;
import com.ijiuchuang.jc_localization.bean.lite.Tag;
import com.ijiuchuang.jc_localization.model.PositionModel;
import com.ijiuchuang.jc_localization.tools.adapter.ViewHolder;
import com.ijiuchuang.jc_localization.tools.adapter.recyclerview.CommonAdapter;

import java.net.Socket;
import java.util.List;

/**
 * Created by Veev on 2016/6/13
 *
 * @link 384506557@qq.com
 */
public class SocketListRecyclerAdapter extends CommonAdapter<Socket> {

    public SocketListRecyclerAdapter(Context context, int layoutId, List<Socket> datas) {
        super(context, layoutId, datas);
    }

    @Override
    public void convert(final ViewHolder holder, final Socket socket) {
        holder.setText(R.id.list_item_socket_text_address, socket.getInetAddress().toString().substring(1));
        holder.setOnClickListener(R.id.list_item_socket_text_address, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            }
        });
    }
}
